<div class="container" ng-controller="storeInfoController">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="col-sm-6">
                <span class="glyphicon glyphicon-user">&nbsp;门店管理&nbsp;</span>
                <span class="glyphicon glyphicon-chevron-right">&nbsp;门店信息&nbsp;</span>
            </div>
            <div class="col-sm-6">
                <div class="col-sm-10">
                    <searchfilter selected-filter="selctedFilter" filter-str="filterStr" filter-types="filterTypes"></searchfilter>
                </div>
                <div class="col-sm-2 ">
                    <button type="button" class="btn btn-default" ng-click="addStore()">
                        <span class="glyphicon glyphicon-plus">添加</span>
                    </button>
                </div>
            </div>
        </div>
    </div>
    <table class="table table-striped" ng-init="getStoreInfo()">
        <tr>
            <th></th>
            <th>门店编号</th>
            <th>门店名称</th>
            <th>门店地址</th>
            <th>状态</th>
            <th>操作</th>
        </tr>

        <tr ng-repeat="item in aStoreInfo | filter: myFilter" ng-switch="item.status">
            <td>{{$index+startIndex}}</td>
            <td>{{item.storeNo}}</td>
            <td>{{item.storeName}}</td>
            <td><a ui-sref="store/info/checkStroeInMap({storeNo:item.storeNo, storeName:item.storeName})">{{item.storeAddress}}</a></td>
            <td>
                <span ng-switch-when="1">已启用</span>
                <span ng-switch-when="2">已冻结</span>
            </td>
            <td>
                <a ui-sref="store/info/updateStore({storeNo:item.storeNo,storeName:item.storeName})">修改</a>&emsp;
                <a href="javascript:;" class="forbidden-btn" ng-switch-when="1"
                   ng-click="forbiddenStore(item.storeNo, item.status)">禁用</a>
                <a href="javascript:;" ng-switch-when="2" ng-click="forbiddenStore(item.storeNo, item.status)">启用</a>
            </td>
        </tr>
    </table>
    <pagination page-size="pageSize" page-no="pageNo" total-size="{{nTotalSize}}" page-nums="{{nPageNums}}" start-index={{startIndex}} end-index={{lastIndex}} refresh-method="getStoreInfo()"></pagination>
</div>
